<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="exampleModalLabel">订单详情</h4>
            </div>
            <div class="modal-body">
                <form id="addList">
                    <div class="form-group" id="search_Order" style="margin:0px auto">
                        <label for="orderid" class="control-label">订单号:</label>
                        <input  type="text" class="form-control" id="orderid" ></input>

<label for="flightno" class="control-label">航班号:</label>
<input  type="text" class="form-control" id="flightno" ></input>

<label for="deptcity" class="control-label">出发地:</label>
<input type="text" class="deptcity" id="deptcity"></input>

<label for="arrcity" class="control-label">目的地:</label>
<input class="form-control" id="arrcity"></input>


<label for="paystatus" class="control-label">支付状态:</label>
<input class="form-control" id="paystatus"></input>

<label for="payid" class="control-label">支付订单ID:</label>
<input class="form-control" id="payid"></input>

<label for="tktstatus" class="control-label">出票状态:</label>
<input class="form-control" id="tktstatus"></input>

<label for="userid" class="control-label">用户ID:</label>
<input class="form-control" id="userid"></input>

<label for="linkman" class="control-label">联系人:</label>
<input class="form-control" id="linkman"></input>

<label for="linkphone" class="control-label">联系人手机号:</label>
<input class="form-control" id="linkphone"></input>

<label for="flightdate" class="control-label">航班日期:</label>
<input class="form-control" id="flightdate"></input>

<label for="flightcabin" class="control-label">舱位:</label>
<input class="form-control" id="flightcabin"></input>

<label for="price" class="control-label">订单价格:</label>
<input class="form-control" id="price"></input>

<label for="createTime" class="control-label">创建时间:</label>
<input class="form-control" id="createTime"></input>

<label for="updateTime" class="control-label">修改时间:</label>
<input class="form-control" id="updateTime"></input>

</div>
</form>
</div>
<div class="modal-footer" style="height: 20px;margin-top: 200px">
    <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
</div>
</div>
</div>
</div>
<script src="../static/twitter-bootstrap-v2/docs/assets/js/jquery.js"></script>
<script src="../static/twitter-bootstrap-v2/js/bootstrap-modal.js"></script>
<script>
    $('#exampleModal').on('show.bs.modal', function (event) {
        var button = $(event.relatedTarget) // 触发模式的按钮
        var recipient = button.data('whatever') // 从数据-属性中提取信息
        // 如果需要，您可以在这里发起一个AJAX请求(然后在回调中进行更新)。.
        // 模态的内容更新。我们将在这里使用jQuery，但是可以使用数据绑定库或其他方法.
        var modal = $(this)
        modal.find('.modal-title').text('New message to ' + recipient)
        modal.find('.modal-body input').val(recipient)
    })
    function queryOrderAll(){
//        获取当前点击事件元素的id
        var id= event.target.id;
        $.ajax({
            url:"/order/queryOrderAll",
            type:"post",
            dataType:"json",
            data:{
                'queryOrderAllid':id,
            },
            success:function(data,state){
//            if (data.length<=0){
//                alert("bai")
//            }
                $("#orderid").val(data.id);
                $("#flightno").val(data.flightno);
                $("#deptcity").val(data.deptcity);
                $("#arrcity").val(data.arrcity);
                $("#paystatus").val(data.paystatus);
                $("#payid").val(data.payid);
                $("#tktstatus").val(data.tktstatus);
                $("#userid").val(data.userid);
                $("#linkman").val(data.linkman);
                $("#linkphone").val(data.linkphone);
                var flightdate=date_reversal(data.flightdate);
                $("#flightdate").val(flightdate);
                $("#flightcabin").val(data.flightcabin);
                $("#price").val(data.price);
                var createtime=date_reversal(data.createtime);
                $("#createTime").val(createtime);
                var updatetime=date_reversal(data.updatetime);
                $("#updateTime").val(updatetime);

            }

        })
    }
</script>